
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>合同详情</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="/css/viewer.css">
    <link rel="stylesheet" href="/css/customerManager/customerDetail.css"/>
    <link rel="stylesheet" href="/css/trainingManager/user/trainingContractDetail.css" type="text/css"/>
    <script th:inline="javascript">
        let trainingContract = [[${trainingContract}]];
        // 合同附件
        let annexFilePath = trainingContract.accessUrl;
        let fileName = trainingContract.fileName;
    </script>
</head>
<body>
<div class="container-fluid" id="trainingContractDetail">
    <div class="card">
        <div class="card-header">
            <h1>合同详情</h1>
            <h5 style="padding-left:10px;line-height:40px"  th:text="'(合同编号:'+${trainingContract?.contractNumber?:''}+')'"></h5>
        </div>
        <div class="card-body">
            <main class="clearFix">
                <form class="clearFix">
                    <div class="form-group clearFix col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
                        <label class="pull-left">客户名称:</label>
                        <input type="text" class="form-control pull-left" readonly id="customerName" th:value="${trainingContract?.customerName?:''}">
                    </div>
                    <div class="form-group clearFix col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6">
                        <label class="pull-left">客户联系人:</label>
                        <input type="text" class="form-control pull-left" readonly id="customerTouchPeople" th:value="${trainingContract?.contactName?:''}">
                    </div>
                    <div class="form-group clearFix col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6">
                        <label class="pull-left">客户联系方式:</label>
                        <input type="text" class="form-control pull-left" readonly id="customerTouchWay" th:value="${trainingContract?.contactDetails?:''}">
                    </div>
                    <div class="form-group clearFix col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6">
                        <label class="pull-left">电子邮箱:</label>
                        <input type="text" class="form-control pull-left" readonly id="email" th:value="${trainingContract?.customerEmail?:''}">
                    </div>
                    <div class="form-group clearFix col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6">
                        <label class="pull-left">合同有效起止:</label>
                        <input type="text" class="form-control pull-left" readonly id="effectiveTime" th:value="${#dates.format(trainingContract?.contractStartDate, 'yyyy-MM-dd')+' 至 '+#dates.format(trainingContract?.contractEndDate, 'yyyy-MM-dd')}" >
                    </div>
                </form>
                <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12" style="margin-bottom:20px;padding-left:40px">
                    <table id="productList"></table>
                </div>
                <form class="clearFix">
                    <div class="form-group clearFix pull-left" style="padding-left:15px">
                        <label class="pull-left">应收金额:</label>
                        <strong style='line-height:40px;' th:text="${trainingContract?.contractReceivables?:'0'}"></strong>
                    </div>
                    <div class="form-group clearFix pull-left">
                        <label class="pull-left">合同状态:</label>
                        <span style='line-height:40px;' th:text="${trainingContract?.contractStatusText?:''}"></span>
                    </div>
                    <div class="form-group clearFix col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
                        <label class="pull-left">合同附件:</label>
                        <a href="#!" th:if="${trainingContract.accessUrl}" style='line-height:40px;' onclick="showFile(0);">查看</a>
                        <span style='line-height:40px;' th:if="!${trainingContract.accessUrl}">无</span>
                    </div>
                    <div class="form-group clearFix col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
                        <label class="pull-left">合同备注:</label>
                        <textarea rows="5" class="form-control pull-left" readonly id="contractNotes"  th:text="${trainingContract?.contractNotes?:''}"></textarea>
                    </div>

                </form>
            </main>
        </div>
    </div>
</div>
<!-- 附件预览 -->
<div class="modal fade bs-example-modal-lg fileModal" tabindex="-1" role="dialog" id="fileModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>附件预览</h4>
            </div>
            <div class="modal-body">
                <iframe src="" frameborder="0" id="fileIframe"></iframe>
            </div>
        </div>
    </div>
</div>

</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<!--<script type="text/javascript" src="/js/bootstrapValidator.min.js"></script>-->
<!--<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>-->
<!--标签插件-->
<!--<script src="/js/jquery-tags-input/jquery.tagsinput.min.js"></script>-->
<!--<script type="text/javascript" src="/js/main.min.js"></script>-->
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/crm/common/common.js"></script>
<!--图片查看-->
<script type="text/javascript" src="/js/viewer.js"></script>
<script type="text/javascript" src="/js/jquery-viewer.js"></script>
<script src="/js/crm/trainingManager/user/trainingContractDetail.js"></script>
</html>